<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Language" content="pl" />
		<title>
			DS DRUK
		</title><%= stylesheet_link_tag 'user', 'semantic_forms' %><%= javascript_include_tag :defaults %>
		<script type="text/javascript">
			//<![CDATA[
			<!--
			Event.observe(window, 'load', function() {
			var scroll = $('scrollbanner');
			var clone = scroll.cloneNode(true);
			scroll.parentNode.insert(clone, scroll); 
			clone.id = 'scrollbanner2';
					
			setInterval(function() {
			var scroll = $('scrollbanner');
			var scroll2 = $('scrollbanner2');
										
			if (parseInt(scroll2.style.left) == 0){
			scroll.style.left = '0px';
			}
			scroll.style.left = (parseInt(scroll.style.left) - 1) + 'px';
			scroll2.style.left = (parseInt(scroll.style.left) + scroll.offsetWidth) + 'px';
			},30);
			});
			-->
			//]]>
		</script>
	</head>
	<% if current_user %>
	<body style="background: &lt;%= current_user.layout %&gt;">
		<div style="width: 900px; height: 30px; background: black">
			<div style="overflow: hidden; position: absolute; width: 900px; height: 30px;">
				<div>
					<div id="scrollbanner" style="position: absolute; left: 0px; top: 3px; height: 20px; white-space: nowrap; color: white;">
						Koszty druków: strona czarno-biała: 
						<%= number_to_currency(Settings.first.price_bw) %> ; strona kolorowa od: 
						<%= number_to_currency(Settings.first.price_color) %>. 
						Znakomita jakość! Szybka realizacja! Funkcja pre-paid!
					</div>
				</div>
			</div>
		</div>
		<div style="position: absolute; top: 0px; width: 900px; height: 30px; background: url(/images/scrollbar.png)"></div>
		<div id="banner">
			<div style="float: right; color: white">
				Zalogowany jako <b><%= link_to current_user.name, :controller => 'users', :action => 'show_user' %></b> (saldo <b><%=  number_to_currency(current_user.saldo) %></b> )

			</div>
			<%= link_to image_tag("btn_wyloguj.png", :mouseover => image_path("btn_wyloguj2.png"),
					:style => "float: right; clear: both"), :controller => 'user_sessions', :action => 'destroy' %>		
			<%= link_to image_tag("btn_user_edycja_profilu.png",
					:mouseover => image_path("btn_user_edycja_profilu2.png"),
					:style => "float: right; clear: right;"), :controller => "users", :action => "edit" %>
			<a style="display: block; width: 900px; height: 185px;" href="/users" alt="DSDruk - system wspomagający drukowanie"></a>
		</div>
		<div id="underbanner">
			<%= link_to image_tag("btn_user_nowe_zlecenie.png",
				:mouseover => image_path("btn_user_nowe_zlecenie2.png")),
				:controller => "prints", :action => "new" %>
			<%= link_to image_tag("btn_user_finanse.png", 
				:mouseover => image_path("btn_user_finanse2.png")), 
				:controller => 'users', :action => 'payments' %>
			<%= link_to image_tag("btn_user_druki.png", 
				:mouseover => image_path("btn_user_druki2.png")), 
				{ :controller => 'users', :action => "prints" } %>
			<%= link_to image_tag("btn_user_pomoc.png", 
				:mouseover => image_path("btn_user_pomoc2.png")), 
				{ :controller => "users", :action => "help", } %>
			<%= link_to image_tag("btn_user_kontakt.png", 
				:mouseover => image_path("btn_user_kontakt2.png")), 
				{ :controller => 'users', :action => "contact" } %>
		</div>
	<% else %>
		<div style="width: 900px; height: 30px; background: black">
			<div style="overflow: hidden; position: absolute; width: 900px; height: 30px;">
				<div>
					<div id="scrollbanner" style="position: absolute; left: 0px; top: 3px; height: 20px; white-space: nowrap; color: white;">
						Koszty druków: strona czarno-biała: 
						<%= number_to_currency(Settings.first.price_bw) %> ; strona kolorowa od: 
						<%= number_to_currency(Settings.first.price_color) %>. 
						Znakomita jakość! Szybka realizacja! Funkcja pre-paid!
					</div>
				</div>
			</div>
		</div>
		<div style="position: absolute; top: 0px; width: 900px; height: 30px; background: url(/images/scrollbar.png)"></div>
		<div id="banner">
			<%= link_to image_tag("btn_zaloguj.png", :mouseover => image_path("btn_zaloguj2.png"),
					:style => "float: right; "), :controller => 'user_sessions', :action => 'new' %><a style="display: block; width: 900px; height: 185px;" href="/users" alt="DSDruk - system wspomagający drukowanie"></a>
		</div>
		<div id="underbanner" style="color: white; text-align: center;">
			Witamy w DS Druk! Jeśli nie masz jeszcze konta, koniecznie się <%= link_to "zarejestruj",  {:controller => 'users', :action => 'new' }, {:style => "color: red "} %> !<br />
			Oczywiście, jeśli masz już konto, możesz się <%= link_to "zalogować", {:controller => 'user_sessions', :action => 'new'},  {:style => "color: green "}  %> .
		</div><% end %>
		<div id="content">
			<%= message_block %>
			<%= yield %>
		</div>
		<div id="footnote"></div>
	</body>
</html>
